package com.soup.view.value;

import com.soup.config.SystemConfiguration;

import java.awt.*;

public class ColorValue {

    public static Color TopNavigationBackground;
    public static Color ContextBackground;

    public static Color TopNavigationForeground;
    public static Color ContextForeground;

    public static Color Border;


    static {
        TopNavigationBackground = getColor(SystemConfiguration.getProperty("color.TopNavigation.Background"));
        ContextBackground = getColor(SystemConfiguration.getProperty("color.Context.Background"));

        TopNavigationForeground = getColor(SystemConfiguration.getProperty("color.TopNavigation.Foreground"));
        ContextForeground = getColor(SystemConfiguration.getProperty("color.Context.Foreground"));

        Border = getColor(SystemConfiguration.getProperty("color.Border"));
    }

    public static Color getColor(String color){
        String[] split = color.split(",");
        Color result = new Color(Integer.parseInt(split[0]),
                Integer.parseInt(split[1]),
                Integer.parseInt(split[2]));
        return result;
    }

}
